﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZbFromPrice.aspx.cs" Inherits="Appraisal.Web.ZB.ZbFromPrice" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>价格评分</title>
    <LINK rel="stylesheet" href="../CSS/Default/Style.css"></LINK>
    <script type="text/javascript" src="../JS/App.js"></script>    
    <base target="_self">
<style type="text/css">
    #popHint {position: absolute; line-height: normal;}
    .style1
    {
        width: 100%;
    }
    .style2
    {
        FONT-WEIGHT: normal;
        FONT-SIZE: 0.7em;
        COLOR: #808080;
        FONT-FAMILY: verdana;
        TEXT-ALIGN: left;
        width: 131px;
    }
    .style3
    {
        FONT-WEIGHT: normal;
        FONT-SIZE: 0.7em;
        COLOR: #808080;
        FONT-FAMILY: verdana;
        TEXT-ALIGN: left;
        width: 314px;
    }
    .style6
    {
        FONT-WEIGHT: normal;
        FONT-SIZE: 0.7em;
        COLOR: #808080;
        FONT-FAMILY: verdana;
        TEXT-ALIGN: left;
        width: 184px;
    }
    .style7
    {
        FONT-WEIGHT: normal;
        FONT-SIZE: 0.7em;
        COLOR: #808080;
        FONT-FAMILY: verdana;
        TEXT-ALIGN: left;
        width: 168px;
    }
</style>
<script language="javascript" type="text/javascript">
<!--
    // 这里都是公用函数，挺多的...
    var 
    // 获取元素
$ = function(element) {
    return (typeof (element) == 'object' ? element : document.getElementById(element));
},

    // 生成元素到refNode
appendElement = function(tagName, Attribute, strHtml, refNode) {
    var cEle = document.createElement(tagName);
    // 属性值
    for (var i in Attribute) {
        cEle.setAttribute(i, Attribute[i]);
    }
    cEle.innerHTML = strHtml;

    refNode.appendChild(cEle);
    return cEle;
},

    // 获取元素坐标
getCoords = function(node) {
    var x = node.offsetLeft;
    var y = node.offsetTop;
    var parent = node.offsetParent;
    while (parent != null) {
        x += parent.offsetLeft;
        y += parent.offsetTop;
        parent = parent.offsetParent;
    }
    return { x: x, y: y };
},

    // 事件操作(可保留原有事件)
eventListeners = [],
findEventListener = function(node, event, handler) {
    var i;
    for (i in eventListeners) {
        if (eventListeners[i].node == node && eventListeners[i].event == event && eventListeners[i].handler == handler) {
            return i;
        }
    }
    return null;
},
myAddEventListener = function(node, event, handler) {
    if (findEventListener(node, event, handler) != null) {
        return;
    }
    if (!node.addEventListener) {
        node.attachEvent('on' + event, handler);
    } else {
        node.addEventListener(event, handler, false);
    }
    eventListeners.push({ node: node, event: event, handler: handler });
},
removeEventListenerIndex = function(index) {
    var eventListener = eventListeners[index];
    delete eventListeners[index];
    if (!eventListener.node.removeEventListener) {
        eventListener.node.detachEvent('on' + eventListener.event,
		eventListener.handler);
    } else {
        eventListener.node.removeEventListener(eventListener.event,
		eventListener.handler, false);
    }
},
myRemoveEventListener = function(node, event, handler) {
    var index = findEventListener(node, event, handler);
    if (index == null) return;
    removeEventListenerIndex(index);
},
cleanupEventListeners = function() {
    var i;
    for (i = eventListeners.length; i > 0; i--) {
        if (eventListeners[i] != undefined) {
            removeEventListenerIndex(i);
        }
    }
};
-->
</script>
<script language="javascript" type="text/javascript">
<!--
    /*********************************************
    - POPHint 弹出提示框
    - By Mudoo 2008.5
    **********************************************/
    function popHint(obj, msg, initValues) {
        var 
	_obj = $(obj),
	_objHint = $("popHint"),
	_msg = msg,
	_init = initValues;

        // 初始化失败...
        if (_obj == undefined || _msg == undefined || _msg == "") return;

        // 设置初始值
        _init = _init == undefined ? { _type: "wrong", _event: "click"} : _init;
        // obj如果不可见。设置弹出对象为obj父元素
        if (_obj.style.display == 'none' || _obj.style.visibility == 'hidden' || _obj.getAttribute('type') == 'hidden') _obj = _obj.parentNode;

        var 
	_type = null,
	_event = null,
	_place = getCoords(_obj),
	_marTop = null,
	_objText = $("popHintText"),

        // 初始化
	init = function() {
	    var _hint = _obj.getAttribute("hint");
	    if (_hint == "false") return;

	    // 有的时候initValues不为空.但是只设置一个值...避免发生错误.再次设置初始值...
	    _type = _init._type == undefined ? "wrong" : _init._type;
	    _type = _type.toLowerCase();
	    _event = _init._event == undefined ? "click" : _init._event;
	    _event = _event.toLowerCase();

	    /*
	    ******************************************
	    popHtml
	    ******************************************
	    <div id="popHint">
	    <div id="popHeader">
	    <div class="popLeft"></div>
	    <div id="popHintText"><span class=\"popIcon wrong></span>请输入您的用户名！</div>
	    <div class="popRight"></div>
	    </div>
	    <div class="popAngle"><span></span></div>
	    </div>
	    */

	    // 好了.输出...
	    /*
	    var _Html = "<div id=\"popHeader\">" +
	    "	<div class=\"popLeft\"></div>" +
	    "	<div id=\"popHintText\"></div>" +
	    "	<div class=\"popRight\"></div>" +
	    "</div>"+
	    "<div class=\"popAngle\"><span></span></div>"
	    */
	    var _Html = "<Table width=\"200px\" bgcolor=\"#CCFF99\">" + "<tr><td><span id=\"popHintText\" style=\"color: #FF9900\">我是中国人，我是中国人，我是中国人，我是中国人，</span></td></tr></table>"
	    if (_objHint == null) {
	        _objHint = appendElement("div", { "id": "popHint" }, _Html, document.body);
	        _objHint.style.display = "none";
	        _objText = $("popHintText");
	    }

	    show();
	},
        // 显示
	show = function() {
	    _objHint.style.display = "";
	    _marTop = _objHint.offsetHeight;

	    _msg = "<span class=\"popIcon " + _type + "\"></span>" + _msg;
	    _objText.innerHTML = _msg;

	    _objHint.style.left = _place.x + "px";
	    //_objHint.style.top = (_place.y-_marTop+8) +"px";
	    _objHint.style.top = (_place.y + 20) + "px";

	    // 关闭触发事件
	    switch (_event) {
	        case "blur":
	            myAddEventListener(_obj, 'blur', hide);
	            break;
	        //default : 
	        case "click":
	            myAddEventListener(document, 'mousedown', hide);
	            break;
	        //这里可以自己扩展很多事件... 
	    }
	},
        // 关闭
	hide = function() {
	    _objHint.style.display = "none";
	    _objText.innerHTML = "";
	    // 移除关闭触发事件
	    myRemoveEventListener(_obj, 'blur', hide);
	    myRemoveEventListener(document, 'mousedown', hide);
	};

        init();
    }

-->
</script>
	    <script src="../JS/jquery-1.6.js" type="text/javascript"></script>
    <script type="text/javascript">
        var $j = jQuery.noConflict();
        $j(document).ready(function() {
            $j('#dtable tr:even').css('backgroundColor', '#E8E6E1');
        });
    </script>
       <base target="_self">                 
</head>
<body  MS_POSITIONING="FlowLayout" topmargin='1'>
    <form id="form1" runat="server">

		<TABLE width= "100%" height="100%">
		<TR style="vertical-align: top">
		<TD>
			<TABLE id="Table1" class="ms-toolbar" cellSpacing="0" cellPadding="0">
				<TR>
					<TD width="2"><IMG alt="" src="Images/blank.gif" width="2" height="1"></TD>
					<TD class="ms-toolbar">
						<TABLE id="Table2" border="0" cellSpacing="0" cellPadding="1">
							<TR>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="btnImgSave" runat="server" ImageUrl="../Images/Default/saveitem.gif"></asp:imagebutton></TD>
								<TD noWrap><asp:linkbutton id="lbtnSubmit" runat="server" CssClass="ms-toolbar" 
                                        onclick="lbtnSubmit_Click"> 保存并提交</asp:linkbutton></TD>
								<TD class="ms-separator">&nbsp;|&nbsp;</TD>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton2" runat="server" ImageUrl="../Images/Default/stkfrm_obj.gif"></asp:imagebutton></TD>
								<TD noWrap><asp:linkbutton id="lbtnCompute" runat="server" CssClass="ms-toolbar" 
                                        onclick="lbtnCompute_Click"> 计算结果</asp:linkbutton></TD>
								<TD class="ms-separator">&nbsp;|&nbsp;</TD>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton4" runat="server" ImageUrl="../Images/Default/print.gif"></asp:imagebutton></TD>
								<TD noWrap><asp:linkbutton id="btnPrintTop" runat="server" CssClass="ms-toolbar" 
                                        CausesValidation="False"> 导出评分</asp:linkbutton></TD>
								<TD class="ms-separator">&nbsp;|&nbsp;</TD>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton6" runat="server" ImageUrl="../Images/Default/undo.gif"></asp:imagebutton></TD>
								<TD noWrap><A class="ms-toolbar" href="javascript:window.close();">返回</A></TD>
							</TR>
						</TABLE>
					</TD>
					<TD width="100%"><IMG alt="" src="Images/blank.gif" width="1" height="22"></TD>
				</TR>
			</TABLE>
			<TABLE id="Table4" border="0" cellPadding="3" width="100%">
				<TR>
					<TH class="ms-formlabel" bgColor="#e1ecfc" vAlign="top" colSpan="4" noWrap align="left">
						评标信息</TH></TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left" width="10%">
						<NOBR>评标名称</NOBR></TH>
					<TD class="ms-formbody" width="30%"><asp:label id="labSubName" runat="server" 
                            CssClass="ms-input"></asp:label></TD>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left" width="10%">
						评<NOBR>标打分表</NOBR></TH>
					<TD class="ms-formbody"><asp:label id="labKpName" runat="server" 
                            CssClass="ms-input"></asp:label></TD>
				</TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						委托单位</TH>
					<TD class="ms-formbody"><asp:label id="labBidderName" runat="server" 
                            CssClass="ms-input"></asp:label></TD>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						专家姓名
					</TH>
					<TD class="ms-formbody"><asp:label id="labUmpName" runat="server" 
                            CssClass="ms-input"></asp:label></TD>
				</TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						评分截止时间</TH>
					<TD class="ms-formbody"><asp:label id="labEndTime" runat="server" 
                            CssClass="ms-input"></asp:label></TD>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						&nbsp;</TH>
					<TD class="ms-formbody">&nbsp;</TD>
				</TR>
				<TR>
					<TH class="ms-formlabel" bgColor="#e1ecfc" vAlign="top" colSpan="4" noWrap align="left">
						项目信息</TH></TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						资料文档
					</TH>
					<TD class="ms-formbody" colspan='3'>
						<asp:Image id="imgReport" runat="server" ImageUrl="../images/default/part.gif" Visible="False"></asp:Image><asp:label id="lbEmployeeReport" runat="server" CssClass="ms-input"></asp:label></TD>
				</TR>
				<TR>
					<TH class="ms-formlabel" bgColor="#e1ecfc" vAlign="top" colSpan="4" noWrap align="left">
						评标内容
						<asp:CustomValidator id="vld_Template" runat="server" 
                            ErrorMessage="评分不能超出评分范围">*</asp:CustomValidator>
						<asp:CustomValidator id="vld_100" runat="server" 
                            ErrorMessage="请不要随意评分">*</asp:CustomValidator></TH></TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						评<NOBR>标内容</NOBR>
					</TH>
					<TD class="ms-formbody" colspan='3'><asp:label id="lbContent" runat="server" CssClass="ms-input"></asp:label></TD>
				</TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left">
						<NOBR>备注说明</NOBR>
					</TH>
					<TD class="ms-formbody" colspan='3'><asp:label id="lbRemark" runat="server" CssClass="ms-input"></asp:label></TD>
				</TR>
				<TR>
					<TD class="ms-formbody" colSpan="4">
			                    <asp:Panel ID="phTemplate" runat="server">
                                </asp:Panel>
                            </TD>
				</TR>
                <TR>
					<TH class="ms-formlabel" bgColor="#e1ecfc" vAlign="top" colSpan="4" noWrap align="left">
						自动评分</TH></TR>
				<TR>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left" width="10%">
						评分选项</TH>
					<TD class="ms-formbody" width="30%">
                        <asp:DropDownList ID="dplType" runat="server" CssClass="ms-input" 
                            AutoPostBack="True" onselectedindexchanged="dplType_SelectedIndexChanged">
                            <asp:ListItem Selected="True" Value="1">直线内插法</asp:ListItem>
                            <asp:ListItem Value="2">基准价法</asp:ListItem>
                        </asp:DropDownList>
                        <asp:LinkButton ID="btnAutoCount" runat="server" onclick="btnAutoCount_Click" 
                            CausesValidation="False">自动评分</asp:LinkButton>
                                </TD>
					<TH class="ms-formlabel" vAlign="top" noWrap align="left" width="10%">
						&nbsp;</TH>
					<TD class="ms-formbody">&nbsp;</TD>
				</TR>
				<TR>
					<TD class="ms-formbody" colSpan="4">
						<asp:Panel ID="p" runat="server" Visible="False">
                            <table class="style1">
                                <tr>
                                    <td class="style2">
                                        平均价：<asp:TextBox ID="txtBasePrice" runat="server" Width="81px">0</asp:TextBox></td>
                                    <td class="style3">
                                        调整系数（请输入0-2的值，可输入小数）：<asp:TextBox ID="txtRate" runat="server" Width="51px" 
                                            BackColor="#66FFFF">1</asp:TextBox><font face="宋体"><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="txtRate" ErrorMessage="调整比例必须是一个数字（如：0.98）" 
                                                ValidationExpression="^\d+(\.\d+)?$">*</asp:RegularExpressionValidator></font></td>
                                    <td class="style7">
                                        基准价：<asp:TextBox ID="txtBaseCount" runat="server" Width="91px"></asp:TextBox></td>
                                    <td class="style6">
                                        每正偏离1%扣分：<asp:TextBox ID="txtAtt1" runat="server" Width="45px" 
                                            BackColor="#66FFFF">1</asp:TextBox><font face="宋体"><asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                                ControlToValidate="txtAtt1" ErrorMessage="正差扣分必须是一个数字" 
                                                ValidationExpression="^\d+(\.\d+)?$">*</asp:RegularExpressionValidator></font></td>
                                    <td class="ms-formlabel">
                                        每负偏离!%扣分：<asp:TextBox ID="txtAtt2" runat="server" Width="40px" 
                                            BackColor="#66FFFF">1</asp:TextBox><font face="宋体"><asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                                ControlToValidate="txtAtt2" ErrorMessage="负差扣分必须是一个数字" 
                                                ValidationExpression="^\d+(\.\d+)?$">*</asp:RegularExpressionValidator></font></td>
                                </tr>
                                <tr>
                                    <td class="ms-formlabel" colspan="5">
                                        注：1、基准价=平均价*调节系数，偏离比例默认值为1%，不足1%向上取整<br />
                                        2、请输入上面蓝色文本框中的计算变量后再按“自动评分”功能键，如投标人的报价无效，在投标人的报价中输入“无效报价”的文字，系统会自动剔除无效报价并按有效报价的投标人数量计算平均价。</td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </TD>
				</TR>
				<TR>
					<TD class="ms-formbody" colSpan="4">
						<asp:ValidationSummary id="vldSummary" runat="server" ShowMessageBox="True"></asp:ValidationSummary></TD>
				</TR>
			</TABLE>
			</TD>
			</TR>
			<TR style="vertical-align: bottom">
			<TD>
			<TABLE id="Table5" class="ms-toolbar" cellSpacing="0" cellPadding="0" >
				<TR>
					<TD width="2"><IMG alt="" src="Images/blank.gif" width="2" height="1"></TD>
					<TD class="ms-toolbar">
						<TABLE id="Table6" border="0" cellSpacing="0" cellPadding="1">
							<TR>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton1" runat="server" ImageUrl="../Images/Default/saveitem.gif"></asp:imagebutton></TD>
								<TD noWrap>
                                    <asp:linkbutton id="lbtnSubmitBottom" runat="server" 
                                        CssClass="ms-toolbar" onclick="lbtnSubmitBottom_Click"> 保存并提交</asp:linkbutton></TD>
								<TD class="ms-separator">&nbsp;|&nbsp;</TD>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton3" runat="server" ImageUrl="../Images/Default/stkfrm_obj.gif"></asp:imagebutton></TD>
								<TD noWrap>
                                    <asp:linkbutton id="lbtnComputeBottom" runat="server" 
                                        CssClass="ms-toolbar" onclick="lbtnComputeBottom_Click"> 计算结果</asp:linkbutton></TD>
								<TD class="ms-separator">&nbsp;|&nbsp;</TD>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton5" runat="server" ImageUrl="../Images/Default/print.gif"></asp:imagebutton></TD>
								<TD noWrap><asp:linkbutton id="btnPrintBottom" runat="server" CssClass="ms-toolbar" 
                                        CausesValidation="False"> 导出评分</asp:linkbutton></TD>
								<TD class="ms-separator">&nbsp;|&nbsp;</TD>
								<TD class="ms-toolbar" noWrap><asp:imagebutton id="Imagebutton7" runat="server" ImageUrl="../Images/Default/undo.gif"></asp:imagebutton></TD>
								<TD noWrap><A class="ms-toolbar" href="javascript:window.close();">返回</A></TD>
							</TR>
						</TABLE>
					</TD>
					<TD width="100%"><IMG alt="" src="Images/blank.gif" width="1" height="22"></TD>
				</TR>
			</TABLE>
			</TD>
			</TR>
			</TABLE>

    </form>
</body>
</html>
